package com.sugar.psych.assessment.module.business.controller.admin.psychquestion.vo;

import com.sugar.psych.assessment.module.business.dal.dataobject.psychquestion.PsychQuestionDO;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import java.util.*;
import javax.validation.Valid;
import javax.validation.constraints.*;

@Schema(description = "管理后台 - 心理测评题目新增/修改 Request VO")
@Data
public class PsychQuestionSaveReqVO {

    @Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "16644")
    private Long id;

    /**
     * 题库编号
     */
    @Schema(description = "题库编号", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "题库不能为空")
    private Long bankId;

    @Schema(description = "题目", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotEmpty(message = "题目不能为空")
    private String title;

    @Schema(description = "选项信息", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "选项信息不能为空")
    @Size(min = 1, message = "选项信息不能为空")
    @Valid
    private List<PsychQuestionDO.Option> optionList;

    @Schema(description = "题型（0单选 1多选）", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
    //@NotNull(message = "题型（0单选 1多选）不能为空")
    private Boolean questionType;

    @Schema(description = "排序（从小到大）", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "排序（从小到大）不能为空")
    private Integer sort;

}